var say = require('say');
var translate = require('translate');
var colors = require('colors');

translate.text({input:'Chinese',output:'Chinese'},'你好', function(err,result){
  console.log(result);
  console.log(err);
  say.speak('Alex', result);
});

translate.text('I want tacos please.', function(err, text){
  if(err){
    console.log('err:',err);
    return;
  }
  console.log('text:',text);
  console.log('I want tacos please.'.red + ' => '.cyan + text.yellow);
  var input = 'Spanish', output = "Japanese";
  translate.text({input:input,output:output}, text, function(err, text2){

    var input = 'Japanese', output = "English";
    console.log(text.yellow + ' => '.cyan + text2.blue);
    translate.text({input:input,output:output}, text, function(err, text3){

       console.log(text2.blue + ' => '.cyan + text3.red);
       console.log('English'.red+'=>'+'Spanish'.yellow+'=>'+'Japanese'.blue+'=>'+'English'.red  +'\ntaco request has been normalized. ^_^'.green);
    });
  }); 
});